quadratic residues number theory